﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BYUStock
{
    public partial class StockHistoryComparatorForm : Form
    {
        public StockHistoryComparatorForm()
        {
            InitializeComponent();
        }

        private async void StockHistoryComparatorForm_Load(object sender, EventArgs e)
        {
            await Test();
        }

        async Task Test()
        {
            using (HttpClient client = new HttpClient())
            {
                // 替换股票代码和证书参数
                string url = "http://hq.sinajs.cn/list=sh601006";
                HttpResponseMessage response = await client.GetAsync(url);
                string data = await response.Content.ReadAsStringAsync();
                Console.WriteLine(data);
            }
        }

    }
}
